home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OSAGeneric.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.7 KB  |  115 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OSAGeneric.p
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT OSAGeneric;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __OSAGENERIC__}
  27. {$SETC __OSAGENERIC__ := 1}
  28.  
  29. {$I+}
  30. {$SETC OSAGenericIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __ERRORS__}
  34. {$I Errors.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __APPLEEVENTS__}
  37. {$I AppleEvents.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __OSA__}
  40. {$I OSA.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {     NOTE:    This interface defines a "generic scripting component."
  49.             The Generic Scripting Component allows automatic dispatch to a
  50.             specific scripting component that conforms to the OSA interface.
  51.             This component supports OSA, by calling AppleScript or some other 
  52.             scripting component.  Additionally it provides access to the default
  53.             and the user-prefered scripting component.
  54. }
  55.  
  56.  
  57.  
  58. CONST
  59.                                                                 {  Component version this header file describes  }
  60.     kGenericComponentVersion    = $0100;
  61.  
  62.     kGSSSelectGetDefaultScriptingComponent = $1001;
  63.     kGSSSelectSetDefaultScriptingComponent = $1002;
  64.     kGSSSelectGetScriptingComponent = $1003;
  65.     kGSSSelectGetScriptingComponentFromStored = $1004;
  66.     kGSSSelectGenericToRealID    = $1005;
  67.     kGSSSelectRealToGenericID    = $1006;
  68.     kGSSSelectOutOfRange        = $1007;
  69.  
  70.  
  71. TYPE
  72.     ScriptingComponentSelector            = OSType;
  73.     GenericID                            = OSAID;
  74. { get and set the default scripting component }
  75. FUNCTION OSAGetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  76.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  77.     INLINE $2F3C, $0004, $1001, $7000, $A82A;
  78.     {$ENDC}
  79. FUNCTION OSASetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSAError;
  80.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  81.     INLINE $2F3C, $0004, $1002, $7000, $A82A;
  82.     {$ENDC}
  83. { get a scripting component instance from its subtype code }
  84. FUNCTION OSAGetScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector; VAR scriptingInstance: ComponentInstance): OSAError;
  85.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  86.     INLINE $2F3C, $0008, $1003, $7000, $A82A;
  87.     {$ENDC}
  88. { get a scripting component selector (subType) from a stored script }
  89. FUNCTION OSAGetScriptingComponentFromStored(genericScriptingComponent: ComponentInstance; {CONST}VAR scriptData: AEDesc; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  90.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  91.     INLINE $2F3C, $0008, $1004, $7000, $A82A;
  92.     {$ENDC}
  93. { get a real component instance and script id from a generic id }
  94. FUNCTION OSAGenericToRealID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; VAR theExactComponent: ComponentInstance): OSAError;
  95.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  96.     INLINE $2F3C, $0008, $1005, $7000, $A82A;
  97.     {$ENDC}
  98. { get a generic id from a real component instance and script id }
  99. FUNCTION OSARealToGenericID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; theExactComponent: ComponentInstance): OSAError;
  100.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  101.     INLINE $2F3C, $0008, $1006, $7000, $A82A;
  102.     {$ENDC}
  103.  
  104.  
  105. {$ALIGN RESET}
  106. {$POP}
  107.  
  108. {$SETC UsingIncludes := OSAGenericIncludes}
  109.  
  110. {$ENDC} {__OSAGENERIC__}
  111.  
  112. {$IFC NOT UsingIncludes}
  113.  END.
  114. {$ENDC}
  115.